﻿// Pour ajouter un code postal ...
// auteur : Sebastian Mosser


var isForeignCity = false;

function foreignCity() {
	if (! isForeignCity)
	  displayForeign();
	else 
	  displayFrench();
}

function displayForeign() {
	var elem = document.getElementById("cityElems");
	var newContent = "<label> ";
	isForeignCity = true;
	newContent += "<input type=\"hidden\" name=\"cityZip\" value=\"FOREIGN\" />";
	newContent += "<center> <span class=\"error\">Ville étrangère</span></center>";
	newContent += "</label>";
	elem.innerHTML = newContent;
}

function displayFrench() {
	var elem = document.getElementById("cityElems");
	var newContent = "<label> ";
  isForeignCity = false;
	newContent += "<span> Code Postal : </span> ";
	newContent += "<input type=\"text\" name=\"cityZip\" class=\"edit\" />";
	newContent += " &nbsp; &nbsp;";
	elem.innerHTML = newContent;	
}

